<?php

namespace App\Kuafu\Category\Enum;

use App\Kuafu\Base\Enum\BaseCodeEnum;

class CategoryCodeEnum extends BaseCodeEnum
{
    //分类输入异常 409xxx
    public const ERR_CATEGORY_NAME_NOT_INPUT = 409001;
    public const ERR_CATEGORY_NAME_TO_LONG   = 409002;
    public const ERR_CATEGORY_DESC_NOT_INPUT = 409003;
    public const ERR_CATEGORY_IMG_NOT_INPUT  = 409004;
    public const ERR_CATEGORY_SORT_NOT_INPUT = 409005;
    public const ERR_DATA_NOT_INPUT          = 409006;
    public const ERR_DATA_NOT_EXIST          = 409007;
    public const ERR_CATEGORY_ID_NOT_EXIST   = 409008;


    //分类系统异常509xxx
    public const ERR_INSERT_ERROR = 509001;
    public const ERR_UPDATE_ERROR = 509002;


    public const CODE_TEXT = [
        //输入异常
        self::ERR_CATEGORY_DESC_NOT_INPUT => "请填写分类描述",
        self::ERR_CATEGORY_NAME_NOT_INPUT => "请输入分类名称",
        self::ERR_CATEGORY_NAME_TO_LONG   => "分类名称不能超过20个字符",
        self::ERR_CATEGORY_SORT_NOT_INPUT => "请填写排序，越小越靠前",
        self::ERR_CATEGORY_IMG_NOT_INPUT  => "请上传分类Logo",
        self::ERR_DATA_NOT_INPUT          => "非法数据，参数校验失败",
        self::ERR_DATA_NOT_EXIST          => "数据不存在或者已经删除",
        self::ERR_CATEGORY_ID_NOT_EXIST   => "非法数据，数据不存在",

        //系统异常
        self::ERR_INSERT_ERROR            => "新增失败,请稍后重试",
        self::ERR_UPDATE_ERROR            => "修改失败，请稍后重试",
    ];
}
